package com.example.studentmanager.mapper;

import com.example.studentmanager.model.Course;
import com.example.studentmanager.model.Grade;
import com.example.studentmanager.model.vo.GradeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
@Mapper
public interface GradeMapper {

    Integer counts(@Param("col") String searchCol, @Param("val") String searchValue);
    void insertGrade(Grade grade);
    void updateGrade(Grade grade);
    Grade selectGrade(@Param("studentid") int studentid,@Param("courseid") int courseid);
    void deleteGrade(@Param("studentid") int studentid,@Param("courseid") int courseid,@Param("studentname") String studentname);
    List<GradeVo> selectAllGrade(@Param("start") Integer start, @Param("rows") Integer rows, @Param("col") String searchCol, @Param("val") String searchValue);
   // List<Grade> selectGradeBy(@Param("courseid") int courseid, @Param("studentid") int studentid,@Param("coursename") String coursename,@Param("studentname") String studentname);
}
